package com.morphiastic.conversion;

public class LongConverter extends ElasticConverter<Long>{

	@Override
	public Long fromIndexValue(Object val) {
		try {
			return Long.parseLong(val.toString());
		} catch (NumberFormatException e) {
		}
		return null;
	}

	@Override
	public String toIndexValue(Object value) {
		if(value == null)return null;
		return value.toString();
	}

	
	
}
